

class DmemberList extends BaseTableList  {

    constructor(props) {
        super(props);
        this.fixedKey="id";
        this.filter = [ 'tag_name_list' ];
        this.fetchUrl="/statistics/dailonggMemberList"
        this.actioncolumns = true;
        this.actionWidth=300;
        this.placeholder="请输入名称";
        this.state.filter= {  tag_name_list: ''};
        this.actioncolumns = false;
        this.columns=this.getColumns();
    }

    state = {
        data: [],       //fetch的数据源
        pagination: {   //搜索参数
            current: 1,
            pageSize: 200,
            keywords: '',
            order: '',
            filter: {},
            total: 0,
            showSizeChanger: true,
            pageSizeOptions: ['200','500'],
            showTotal: ((total) => {
                return `共 ${total} 条`;
            }),
            onShowSizeChange: (current, pageSize) => {
                const { pagination } = this.state;
                pagination.pageSize = pageSize;
                this.setState({
                    pagination
                });
            }
        },
        loading: false,
        visible: false,
        modalText: '确定删除？',
        selectedRowKeys: [],
        selectedRows: [],
    }

    res_data = {
        index: {
            label: '序号',
            width: 50
        },
        name: {
            label: '姓名',
            width: 100
        },
        company: {
            label: '公司',
            width: 200,
        },
        score:{
            label: '等级分',
            width: 100,
        },
        score_type:{
            label: '等级',
            width: 100,
        },
        dailong_num: {
            label: '代龙数',
            width: 100,
        }
    }


    inputRender(){
        const {pagination, selectedRows, selectedRowKeys } = this.state;
        return <div>
            <Form style={{"display":"flex",padding: "24px 0 0 24px"}}>
                <div style={{flex: 1,display:  'flex'}}>
                    <Popover placement={'bottomLeft'} content={this.filterContent()} trigger="hover">
                        <Button style={{"marginRight": 15,"top": 4}}>{"筛选"}</Button>
                    </Popover>
                    <Form.Item>
                        <Input  name="keywords" style={{width: 300}} placeholder={this.placeholder} defaultValue={pagination.keywords}/>
                    </Form.Item>
                    <Button type="primary" onClick={this.handleSearch} style={{"position":"relative","left":15,"top":3}}>搜索</Button>
                </div>
            </Form>
            <div style={{position: 'relative',top: -15,left: 25}}>
                {
                    this.tagsRender()
                }
            </div>
        </div>
    }

    edit=async row=>{
        let inputRef=null;
        let that=this;
        await new Promise(resolve => {
            Modal.confirm({
                icon: <span></span>,
                title: '编辑',
                width:1000,
                content:
                    <Input.TextArea ref={r=>{
                        inputRef=r;
                    }
                    } defaultValue={row.cmd} rows={5} cols={10} />
                ,
                async onOk() {
                    let value=   inputRef.textAreaRef.value
                    let r= await MIO.configUpdate({id:row.id,useData:value});
                    if(M.checkR(r)){
                        that.fetch();
                    }
                    resolve();
                },
                onCancel() { },
            });
        });
    }


    //新增
    handleCreate(){

    }




}











